package prime_numbers;

public class check_prime {

	int p = 0;

	public void checkprime(int input) {

		int sq_rt = (int) Math.sqrt(input);

		for (int i = 2; i <= sq_rt; i++) {

			if (input == 2) {
				System.out.println("number is prime");

			}

			if (input % i == 0) {
			
				//	System.out.println("input ::" + input + " i ::" + i);
				p = 1;
		//		System.out.println(p);
				break;

			}

		}
		if (p==0) {

			System.out.println("number is prime");
		} else {
			System.out.println("number is not prime");
		}


	}

}
